package com.sharecode.stock.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.sharecode.stock.repository.StockCodeRepository;
import com.sharecode.stock.vo.stock.StockCode;

@Service
public class StockCodeService {

	@Autowired
	private StockCodeRepository stockCodeRepository;

	public void save(StockCode stockCode) {
		stockCodeRepository.save(stockCode);
	}

	public void save(List<StockCode> stockCodes) {
		stockCodeRepository.saveAll(stockCodes);
	}

	public List<StockCode> getAll() {
		return stockCodeRepository.findAll();
	}
}
